www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\smallclass.asp
<!-- #include file="conn.asp" --> <% '**************************************************** 'Code for EptimeFFMS 'Vision : v3.0 '**************************************************** %> <html> <head> <title><%=sitename%>-小类管理</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="images/admin.css" rel="stylesheet" type="text/css"> <style> body { background-color:#FFFFFF; } </style> <script> function CheckAll(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.name != 'chkall') e.checked = form.chkall.checked; } } </script> </HEAD> <BODY> <% nowtype=request("type") nowbigclass=request("bigclass") %> <table width="95%" border="0" cellpadding="0" cellspacing="2" align="center"> <form name="form2"> <tr> <td width="25%" height="30"> </td> <td width="75%" align="right"> 类型: <select name="type" onChange="form2.submit()"> <option value=""></option> <option value="0"<%if nowtype="0" then%> selected="selected"<%end if%>>收入</option> <option value="1"<%if nowtype="1" then%> selected="selected"<%end if%>>支出</option> </select> <% if nowtype="" then sql="select * from Eptime_money_bigclass order by type" else sql="select * from Eptime_money_bigclass where type="&nowtype&" order by id" end if set rs_bigclass=conn.execute(sql) %> 请选择大类: <select name="bigclass" onChange="form2.submit()"> <option value="">请选择大类</option> <% do while rs_bigclass.eof=false %> <option value="<%=rs_bigclass("id")%>"<%if trim(cstr(rs_bigclass("id")))=nowbigclass then%> selected="selected"<%end if%>><%=rs_bigclass("bigclass")%></option> <% rs_bigclass.movenext loop %> </select> </td> </tr> </form> </table> <table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED"> <tr> <td><img src="images/r_1.gif" alt="" /></td> <td width="100%" background="images/r_0.gif"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> 修改 / 删除小类</td> <td align="right"><input type="button" value="添加小类" onClick="window.location.href='smallclass_add.asp'" class="button"> </td> </tr> </table> </td> <td><img src="images/r_2.gif" alt="" /></td> </tr> <tr> <td></td> <td> <form name="form1" action="smallclass_del.asp"> <table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1"> <tr align="center"> <td height="30" class="category">类型</td> <td class="category">所属大类</td> <td class="category">小类名称</td> <td width="15%" class="category">修改</td> <td width="5%" class="category">删除</td> </tr> <% if nowbigclass="" then if nowtype="" then sql="select * from Eptime_money_smallclass order by id_bigclass,id" else sql="select * from Eptime_money_smallclass where id_bigclass in (select id from Eptime_money_bigclass where type="&nowtype&") order by id_bigclass,id" end if else sql="select * from Eptime_money_smallclass where id_bigclass="&nowbigclass&" order by id" end if set rs_smallclass=conn.execute(sql) do while rs_smallclass.eof=false sql="select * from Eptime_money_bigclass where id="&rs_smallclass("id_bigclass") set rs_bigclass=conn.execute(sql) %> <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''"> <td align="center" height="25"><%if rs_bigclass("type")=0 then%>收入<%else%>支出<%end if%></td> <td align="center"><%=rs_bigclass("bigclass")%></td> <td align="center"><%=rs_smallclass("smallclass")%></td> <td align="center"><a href="smallclass_modi.asp?id=<%=rs_smallclass("id")%>"><img src="images/res.gif" border="0" hspace="2" align="absmiddle">修改</a></td> <td align="center"><input type="checkbox" name="ID" value="<%=rs_smallclass("id")%>" style="border:0"></td> </tr> <% rs_smallclass.movenext loop %> <tr> <td colspan="5" height="30" class="category"> <table cellpadding=0 cellspacing=0 width="100%"> <tr> <td align="left" style="color:#FF0000;"> </td> <td align="right"> <input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选 <input type="submit" value="删 除" class="button" onClick="return confirm('警告:删除删除此小类是一种非常危险的操作!该操作将会删除所有与此小类相关的数据,如收支流水账、转账记录、借贷记录等,请慎重操作!!!\n\n确定要删除此小类吗?')"> </td> </tr></table></td></tr> </table> </form> </td> <td></td> </tr> <tr> <td><img src="images/r_4.gif" alt="" /></td> <td></td> <td><img src="images/r_3.gif" alt="" /></td> </tr> </table> </body> </html>